package com.stb.llh.service;

import com.stb.llh.dao.LifeDao;
import com.stb.llh.entity.PreLife;
import com.stb.llh.util.TimesGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author Lee
 * @Date 2021/11/4
 * @Description
 */

@Service
@Transactional
public class LifeService {

    @Autowired
    private LifeDao lifeDao;

    public void insertLife(PreLife preLife){
        preLife.setDates(TimesGenerator.time());
        lifeDao.save(preLife);
    }
}
